package com.ml.mall.service.credit;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ml.mall.bean.base.ApiRestResult;
import com.ml.mall.bean.req.credit.CreditEditDto;
import com.ml.mall.bean.req.credit.CreditNewDto;
import com.ml.mall.bean.req.credit.CreditQueryDto;
import com.ml.mall.bean.req.credit.CreditQueryOneDto;
import com.ml.mall.bean.res.credit.CreditQueryInfoRes;
import com.ml.mall.bean.res.credit.CreditQueryRes;
import com.ml.mall.entity.credit.SysCredit;

import java.math.BigDecimal;

public interface SysCreditService extends IService<SysCredit>{

    /**
     * @description    :创建公司余额
     * @author         :zxm
     * @date           :2021/5/19
    **/
    ApiRestResult createCredit(CreditNewDto dto);

    /**
     * @description    :查询单个公司余额
     * @author         :zxm
     * @date           :2021/5/19
    **/
    CreditQueryInfoRes queryOneCredit(CreditQueryOneDto dto);

    /**
     * @description    :分页查询公司余额
     * @author         :zxm
     * @date           :2021/5/19
    **/
    IPage<CreditQueryRes> queryPageCredit(CreditQueryDto dto);

    /**
     * @description: 根据公司编号查询余额
     * @author kyyang
     * @date 2021/6/4 0:21
     * @version 1.0
     */
    BigDecimal getBalanceByCompanyId(Long companyId);

    /**
     * @description: 公司余额编辑
     * @author kyyang
     * @date 2021/8/1 21:50
     * @version 1.0
     */
    void creditEdit(CreditEditDto dto);
}
